﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Passwords.Controllers
{
    /// <summary>
    /// "supervising controller" pattern of a MCP model requires the view to bind data with the model, thus it must implement IViewBinding
    /// Note that this interface is not necassary for the prefered "passivew view" pattern.
    /// </summary>
    /// <typeparam name="M">Type of model to bind.</typeparam>
    public interface IViewBinding<M>
    {
        /// <summary>
        /// Binds or unbinds the model with the view.
        /// </summary>
        /// <param name="model">Model to bind, or null to remove previous binding.</param>
        void Bind(M model);
    }
}
